Skip to content

Fixed up for release. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 22, 2019
Merged

Fixed up for release. #1

merged 3 commits into from
Mar 22, 2019

Conversation

kattni
Copy link

@kattni kattni commented Mar 21, 2019

No description provided.

@kattni kattni requested a review from ladyada March 21, 2019 19:52
@@ -38,21 +38,50 @@

"""

from micropython import const
import displayio
from adafruit_display_text.text_area import TextArea
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adafruit_display_text should refer to Label, instead of TextArea (https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/releases/tag/2.0.0)

Defaults to RECT.
:param fill_color: The color to fill the button. Defaults to 0xFFFFFF.
:param outline_color: The color of the outline of the button.
:param label: The button label. Defaults to 0x0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

label is the button text that appears inside it, by default nothing is displayed

if self.shadow:
self.group.append(self.shadow)
self.group.append(self.body)

if label and (label_color is not None): # button with text label
if label and (label_color is not None): # button with text label
if not label_font:
raise RuntimeError("Please provide label font")
dims = label_font.text_bounding_box(label)
if dims[2] >= width or dims[3] >= height:
raise RuntimeError("Button not large enough for label")
self.label = TextArea(label_font, text=label)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Label not TextArea, too

@ladyada ladyada merged commit 07c588b into adafruit:master Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants